<?php
class person{
	public function Insert($person)
	{
		$ci =& get_instance();
		
		$person->iduser = $person->user->id;
		$ci->load->library('user');
		$ci->user->Insert($person->user);
		
		$user = $ci->user->GetByEmail($person->user->email);
		$person->iduser = $user->id;
		
		unset ($person->user);
		
		$ci->db->insert('person', $person);
	}
}
?>